Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm'; |
||
2 | |||
3 | @Entity() |
||
4 | export class Cooperative { |
||
5 | @PrimaryGeneratedColumn('uuid') |
||
6 | private id: string; |
||
7 | |||
8 | @Column({ type: 'varchar', nullable: false }) |
||
9 | private name: string; |
||
10 | |||
11 | @Column({ |
||
12 | type: 'integer', |
||
13 | nullable: false, |
||
14 | default: 420, |
||
15 | comment: 'Stored in minutes' |
||
16 | }) |
||
17 | private dayDuration: number; |
||
18 | |||
19 | constructor(name: string, dayDuration: number) { |
||
20 | this.name = name; |
||
21 | this.dayDuration = dayDuration; |
||
22 | } |
||
23 | |||
24 | public getId(): string { |
||
25 | return this.id; |
||
26 | } |
||
27 | |||
28 | public getName(): string { |
||
29 | return this.name; |
||
30 | } |
||
31 | |||
32 | public getDayDuration(): number { |
||
33 | return this.dayDuration; |
||
34 | } |
||
36 |